package com.zc.framework.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import java.util.logging.Logger;

/**
 * Created by zc on 2016/8/30.
 */
public class DataSourceDynamicRoute extends AbstractRoutingDataSource {

    public DataSourceDynamicRoute() {

    }

    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceContextHolder.getDataSource();
    }

    @Override
    public Logger getParentLogger() {
        return null;
    }
}
